package com.ilink.dataanalysis.entity.PO;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;

/**
 * ElasticSearch日志文档的映射实体类(课程资源访问信息)
 */
@Data
@Document(indexName = "my-template-course-access")  //索引名称，可在服务器上输入相应命令查看
public class CourseAccessLogInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    private String id;  //Elasticsearch文档的ID

    @Field(type = FieldType.Long, name = "course_source_id")
    private Long courseSourceId;  //访问课程资源id

    @Field(type = FieldType.Date, pattern = "yyyy-MM-dd HH:mm:ss", name = "event_time")
    private Date eventTime;  //访问时间
}

